import "./App.css";
import { RouterProvider } from "react-router-dom";
import routers from "./router/index.tsx";
import { Provider } from "react-redux";

import "./index.css";
import { PersistGate } from "redux-persist/integration/react";
import store, { persistor } from "./store";
import { Spin } from "antd";
import "animate.css";

function App() {
  return (
    <>
      <Provider store={store}>
        <PersistGate loading={<Spin />} persistor={persistor}>
          <RouterProvider router={routers} /> {/* 渲染路由，不再嵌套 App */}
        </PersistGate>
      </Provider>
    </>
  );
}

export default App;
